package com.jeethink.common.core.domain.entity;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.jeethink.common.annotation.Excel;
import com.jeethink.common.core.domain.BaseEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * 商品类型对象 tb_commodity_type
 * 
 * @author ypr
 * @date 2021-06-09
 */
public class TbCommodityType extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 商品类型id */
    private Long commodityTypeId;

    /** 父部门id */
    private Long parentId;

    /** 祖级列表 */
    @Excel(name = "祖级列表")
    private String ancestors;

    /** 类型名称 */
    @Excel(name = "类型名称")
    private String typeName;

    /** 显示顺序 */
    @Excel(name = "显示顺序")
    private Long orderNum;

    /** 类型状态 */
    @Excel(name = "类型状态")
    private String status;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /** 父部门名称 */
    private String parentName;

    /** 子部门 */
    private List<TbCommodityType> children = new ArrayList<TbCommodityType>();


    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public List<TbCommodityType> getChildren() {
        return children;
    }

    public void setChildren(List<TbCommodityType> children) {
        this.children = children;
    }

    public void setCommodityTypeId(Long commodityTypeId)
    {
        this.commodityTypeId = commodityTypeId;
    }

    public Long getCommodityTypeId() 
    {
        return commodityTypeId;
    }
    public void setAncestors(String ancestors) 
    {
        this.ancestors = ancestors;
    }

    public String getAncestors() 
    {
        return ancestors;
    }
    public void setTypeName(String typeName) 
    {
        this.typeName = typeName;
    }

    public String getTypeName() 
    {
        return typeName;
    }
    public void setOrderNum(Long orderNum) 
    {
        this.orderNum = orderNum;
    }

    public Long getOrderNum() 
    {
        return orderNum;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("commodityTypeId", getCommodityTypeId())
            .append("ancestors", getAncestors())
            .append("typeName", getTypeName())
            .append("orderNum", getOrderNum())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
